﻿using Microsoft.Extensions.Hosting;
using System;
using System.Threading;
using System.Threading.Tasks;

namespace H2O.Assistant
{
    public class TopshelfLifetime : IHostLifetime
    {
        private IApplicationLifetime _applicationLifetime { get; }

        public TopshelfLifetime(IApplicationLifetime applicationLifetime)
        {
            _applicationLifetime = applicationLifetime ?? throw new ArgumentNullException(nameof(applicationLifetime));
        }


        public Task StopAsync(CancellationToken cancellationToken)
        {
            return Task.CompletedTask;
        }

        public Task WaitForStartAsync(CancellationToken cancellationToken)
        {
            return Task.CompletedTask;
        }
    }
}
